﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using System.Runtime.Remoting.Messaging;

using DAL;
using Model;

namespace BLL
{
	/// <summary>
    /// 程序应用表 業務類
    /// </summary>
    public class AppBLL : BaseBLL<Model.App>
    {
        /// <summary>
        /// 子类数据访问类对象
        /// </summary>
		AppDAL childDAL = null;
        #region 重写父类的抽象方法
        /// <summary>
        /// 重写父类的抽象方法
        /// </summary>
        protected override void SetDAL()
        {
            childDAL = new DAL.AppDAL();
            dal = new DAL.AppDAL();//为父类变量赋值
        }
        #endregion

		#region 當前類業務類對象
		/// <summary>
        /// 當前類業務類對象
        /// </summary>
        public static AppBLL CurrBll
        {
            get
            {
                AppBLL bll = CallContext.GetData(typeof(AppBLL).Name) as AppBLL;
                if (bll != null)
                {
                    return bll;
                }
                else
                {
                    bll = new AppBLL();
                    CallContext.SetData(typeof(AppBLL).Name, bll);
                    return bll;
                }
            }
        }
        /// <summary>
        /// 通過項目名獲得項目
        /// </summary>
        public App GetmodelByAppName(out bool isSuccess, string Appname)
        {
            return childDAL.GetmodelByAppName(out isSuccess, Appname);
        }
        #endregion
    }
}
